import request from '@/config/axios'

// 已关闭移交项目清册 VO
export interface ClosedProjectInventoryVO {
  id: number // 序号
  projectNo: string // 项目编号
  projectName: string // 项目名称
  customerManager: string // 客户经理
  originalProjectManager: string // 原项目经理
  originalExecutionDept: string // 原执行科室
  projectLevel: string // 项目等级
  deliveryTime: Date // 交付时间
  systemType: string // 系统类型
  softwareVersion: string // 软件版本
  hardwareVersion: string // 硬件版本
  warrantyPeriodStart: Date // 质保期开始日期
  warrantyPeriodEnd: Date // 质保期结束日期
  ownerInfo: string // 业主信息
  purchaserInfo: string // 采购方信息
  isInWarranty: boolean // 是否在质保期
  remarks: string // 备注
}

// 已关闭移交项目清册 API
export const ClosedProjectInventoryApi = {
  // 查询已关闭移交项目清册分页
  getClosedProjectInventoryPage: async (params: any) => {
    return await request.get({ url: `/om/closed-project-inventory/page`, params })
  },

  // 查询已关闭移交项目清册详情
  getClosedProjectInventory: async (id: number) => {
    return await request.get({ url: `/om/closed-project-inventory/get?id=` + id })
  },

  // 新增已关闭移交项目清册
  createClosedProjectInventory: async (data: ClosedProjectInventoryVO) => {
    return await request.post({ url: `/om/closed-project-inventory/create`, data })
  },

  // 修改已关闭移交项目清册
  updateClosedProjectInventory: async (data: ClosedProjectInventoryVO) => {
    return await request.put({ url: `/om/closed-project-inventory/update`, data })
  },

  // 删除已关闭移交项目清册
  deleteClosedProjectInventory: async (id: number) => {
    return await request.delete({ url: `/om/closed-project-inventory/delete?id=` + id })
  },

  // 导出已关闭移交项目清册 Excel
  exportClosedProjectInventory: async (params) => {
    return await request.download({ url: `/om/closed-project-inventory/export-excel`, params })
  },
}